package com.hippo.core.ui.compose.setting

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.hippo.core.R
import com.hippo.core.core.ext.click
import com.hippo.core.ui.components.CommonBody
import com.hippo.core.ui.theme.ColorBackgroundPrimary
import com.hippo.core.ui.theme.HippoTheme

@Deprecated("需求不做了")
@Composable
fun ReservationScreen(onBack:()->Unit,onAdd:()->Unit) {


    CommonBody(
        title = stringResource(R.string.reservation_1),
        onBack = onBack
    ) {

        Box(
            contentAlignment = Alignment.Center,
            modifier = Modifier
                .fillMaxSize()
                .background(ColorBackgroundPrimary)
        ) {


            Column(
                horizontalAlignment = Alignment.CenterHorizontally,
                modifier = Modifier.fillMaxWidth(0.6F)
            ) {

                Image(
                    painter = painterResource(id = R.mipmap.add),
                    contentDescription = null,
                    modifier = Modifier.size(90.dp).click {
                        onAdd()
                    }
                )

                Spacer(modifier = Modifier.height(30.dp))

                Text(
                    text = stringResource(R.string.reservation_2),
                    style = TextStyle(
                        fontSize = 25.sp,
                        color = Color.Black,
                        fontWeight = FontWeight.Bold
                    )
                )

                Spacer(modifier = Modifier.height(30.dp))

                Text(
                    text = stringResource(R.string.reservation_3),
                    textAlign = TextAlign.Center,
                    style = TextStyle(
                        fontSize = 16.sp,
                        color = Color.Gray,
                    )
                )

            }

        }
    }

}


@Preview(showBackground = true)
@Composable
private fun ReservationScreenPreview() {
    HippoTheme {
        ReservationScreen({},{})
    }
}





